﻿function selectAllCheckbox(obj, chkName) {
    //$('span[name = "' + chkName + '"]').children().attr('checked', obj.checked);
    $('span[name = "' + chkName + '"]').children(':enabled').attr('checked', obj.checked);
}
function changeChecked(elementID, checked) {
    $('#' + elementID).attr('checked', false);
}
function selectOneRadiobox(obj, rdoName) {
    $('span[name = "' + rdoName + '"]').children().attr('checked', false);
    obj.checked = true;
}
function enableCheckboxByName(elementName, status) {
    if (!status) {
        $('span[name = "' + elementName + '"]').children().attr('disabled', 'disabled');
    }
    else {
        $('span[name = "' + elementName + '"]').children().attr('disabled', '');
    }
}
function enableCheckboxById(elementID, status) {
    if (!status) {
        $('#' + elementID).attr('disabled', 'disabled');
    }
    else {
        $('#' + elementID).attr('disabled', '');
    }
}
function PopupCenter(pageURL, title, w, h) {
    var left = (screen.width / 2) - (w / 2);
    var top = (screen.height / 2) - (h / 2);
    var targetWin = window.open(pageURL, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, copyhistory=no, width=' + w + ', height=' + h + ', top=' + top + ', left=' + left);
    targetWin.focus();
    return false;
}